<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

 <f:loadBundle basename="com.ecommerceWeb.common.messages" var="message"/>

<f:view>
  <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></meta>
      <title>
        <h:outputText value="Solutech-shop Login page"/>
      </title>
        <link href="css/solutech.css" rel="stylesheet" media="screen"></link>
      <link rel="shortcut icon" href="img/logo.ico">
    </head>
    <body><h:form>
        <table width="100%" border="0">
          <tr>
            <td>
              <h1 align="center">
                <h:graphicImage url="/img/logo.jpg"
                                alt="Solutech Logo" style="height: 124px; width: 181px"/>
                <h:outputText value="Solutech-Shop Application"/>
              </h1>
            </td>
          </tr>          
          <tr>
          <td> 
        <f:subview id="loginbar">
          <jsp:include page="loginbar.jsp"/>
        </f:subview>
          </td>
         </tr>
          <tr>
        
            <td>
              <p><h:outputText value="Connexion" styleClass="PageTitle"/></p>
              
             
            
            
            
              <h:messages globalOnly="true" infoClass="LoginError"/>              
              <h:panelGrid width="70%" columns="3" border="0"
                           styleClass="form-bkg">
                <h:outputLabel value="Login:" for="userid"/>                
                <h:inputText required="true" id="userid"
                             binding="#{Login_Backing.userid}"/>
                <h:message for="userid" errorClass="ValidateError"/>
                <h:outputLabel value="Mot de passe:" for="password"/>                
                <h:inputSecret required="true" id="password"
                               binding="#{Login_Backing.password}"/>
                <h:message for="password" errorClass="ValidateError"/>
                <f:verbatim>&nbsp;</f:verbatim>
                <h:panelGroup>
                  <h:commandButton value="Login"
                                   action="#{Login_Backing.login}"/>
               
                </h:panelGroup>
               <f:facet name="header">
								<h:outputText value="#{Login_Backing.myMessage}" 
								style="color:red; font-weight: bold;" rendered="#{Login_Backing.exist}"/>
						</f:facet>
                <f:verbatim>&nbsp;</f:verbatim>
              </h:panelGrid>
            </td>
          </tr>
        </table>
      </h:form></body>
  </html>
</f:view>